<?php
/**
 * 后台首页
 * [ranknow bbs!] (C)2009-2015 ranknow.cn.
 *
 * @author liwei
 * @This is NOT a freeware, use is subject to license terms
 * @rcsfile $RCSfile: admin/index.php,v $
 * @revision $Revision: 0.1 $
 * @date $Date: 2009/12/30 09:40:17 $
 */
require '../config.inc.php';
$action = $_GET['action']?$_GET['action']:'';
$id = $_GET['id']?$_GET['id']:0;
$template_data['action'] = $action;
dbConnect();
if ( $action == 'manage_categories' ) {
		include BBS_MDL_PATH . 'mdl_forum.php';
		$forum_list = array();
		$forum_list = get_forum_list( 0, 10 );
		$template_data['forum_list'] = $forum_list;
} elseif ( $action == 'editcategory' ) {
		include BBS_MDL_PATH . 'mdl_forum.php';
		$forum = array();
		$forum = get_forum_by_id( $id );
		$template_data['forum'] = $forum;
} else {
		$template_data['id'] = $id;
}
$template = admin_load_template( 'index.html' );
windowNoCache();
$template -> display( $template_data );
dbDisconnect();
?>